package org.dromara.netbar.domain.bo;

import org.dromara.netbar.domain.NetbarProductStockLog;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 网吧商品库存流水业务对象 netbar_product_stock_log
 *
 * @author Lion Li
 * @date 2025-08-21
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = NetbarProductStockLog.class, reverseConvertGenerate = false)
public class NetbarProductStockLogBo extends BaseEntity {

    /**
     * 流水ID
     */
    @NotNull(message = "流水ID不能为空", groups = { EditGroup.class })
    private Long logId;

    /**
     * 商品ID
     */
    @NotNull(message = "商品ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    /**
     * 仓库ID
     */
    private Long warehouseId;

    /**
     * 变动类型（1入库 2出库 3调拨 4盘点 5损耗 6初始）
     */
    @NotBlank(message = "变动类型（1入库 2出库 3调拨 4盘点 5损耗 6初始）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String changeType;

    /**
     * 变动数量（正数增加，负数减少）
     */
    @NotNull(message = "变动数量（正数增加，负数减少）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long changeCount;

    /**
     * 当前库存（变动后的真实库存）
     */
    @NotNull(message = "当前库存（变动后的真实库存）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long currentStock;

    /**
     * 关联单据号
     */
    private String relatedOrder;

    /**
     * 批次号
     */
    private String batchNo;

    /**
     * 供应商ID
     */
    private Long supplierId;

    /**
     * 备注
     */
    private String remark;


}
